/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#pragma once

#include <noise/hard/Channel.h>
///#include <logs/Log.h>

namespace liba
{
namespace noise
{

// Alas, C++ does not have good idiom for redirect
class ImmortalChannel : public hard::Channel
{
	hard::Channel * channel;
public:
	explicit ImmortalChannel(hard::Channel * channel)
		:	channel( channel )
	{
///		logs::log() << (int)channel << " liba::noise::ImmortalChannel::ImmortalChannel\n";
	}
	virtual ~ImmortalChannel();
	virtual void play(DataSource * source)
	{
		channel->play( source );
	}
	virtual void stop()
	{
		channel->stop();
	}
	virtual bool is_finished()
	{
		return channel->is_finished();
	}

	virtual properties::AbstractDependencyProperty* FindProperty(const Atom& name) LIBA_OVERRIDE;
};

} // namespace noise
} // namesapce liba
using namespace liba;
